#ifndef _BA_H
#define _BA_H
/*
  author Sylvain Bertrand <digital.ragnarok@gmail.com>
  Protected by GNU Affero GPL v3 with some exceptions.
  See README at root of alga tree.
*/
#define IH_RING_LOG2_DWS 14
#define CP_RING_LOG2_QWS 17

struct ba_page
{
	void *cpu_addr;
	dma_addr_t bus_addr;
};

struct ba
{
	struct ba_page dummy;
	struct ba_page wb;
	struct ba_page ih_ring;
	struct ba_page cp_ring;

	struct gpu_range ctx0;
	struct gpu_range ctx1;
};

int ba_init(struct pci_dev *dev);
void ba_cleanup(struct pci_dev *dev);
int ba_map(struct pci_dev *dev);
void ba_unmap(struct pci_dev *dev);
#endif /* _BA_H */
